home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / e / misc.txt / 000177_bonomi@host122.r-bonomi.com_Mon Jun 30 09:41:37 2008.msg < prev    next >
Internet Message Format  |  2020-01-01  |  4KB

  1. Path: reader2.panix.com!panix!newsfeed.stanford.edu!postnews.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local02.nntp.dca.giganews.com!nntp.posted.nuvoxcommunications!news.posted.nuvoxcommunications.POSTED!not-for-mail
  2. NNTP-Posting-Date: Thu, 19 Jun 2008 20:22:27 -0500
  3. Newsgroups: comp.protocols.kermit.misc
  4. References: <dd9ih5-31m.ln1@CPE-124-182-119-184.sa.bigpond.net.au> <slrng52q33.cri.fdc@panix2.panix.com>
  5. Organization: Gizmos & Gadgets, Ltd.
  6. Subject: Re: compiler warning when compiling ftp://ftp.columbia.edu/kermit/test/tar/x.tar.gz
  7. X-Newsreader: trn 4.0-test76 (Apr 2, 2001)
  8. From: bonomi@host122.r-bonomi.com (Robert Bonomi)
  9. Originator: bonomi@host122.r-bonomi.com (Robert Bonomi)
  10. Message-ID: <NqKdnau5iKTOm8bVnZ2dnUVZ_jadnZ2d@posted.nuvoxcommunications>
  11. Date: Thu, 19 Jun 2008 20:22:27 -0500
  12. Lines: 61
  13. X-Usenet-Provider: http://www.giganews.com
  14. NNTP-Posting-Host: 204.87.227.26
  15. X-Trace: sv3-ut2180YT/MdRaZQnVkpz5l+J37MrxBkwJCVor8ZwMnc9Ls0LnnhwriSFWmxA1D204f9ZJgJ76Ix3flg!hJz0HHfj+PSohgzD0AcBPsRnJqrjXGm1xRlpzfZGwiYl4qJrLT+zZKhfY21/1nqFrADj7BRA1COR!18n+1u3YWr7M1tnIZ+9U19sY6HRkFQxdaVSvtlJJc9k=
  16. X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
  17. X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
  18. X-Postfilter: 1.3.39
  19. Xref: panix comp.protocols.kermit.misc:15769
  20.  
  21. In article <slrng52q33.cri.fdc@panix2.panix.com>,
  22. Frank da Cruz  <fdc@columbia.edu> wrote:
  23. >On 2008-06-04, Arthur Marsh <arthur.marsh@internode.on.net> wrote:
  24. >: I don't know if this is worth checking:
  25. >:
  26. >: gcc-4.3 -O3 -march=pentium2 -funsigned-char -pipe -DPOSIX -DLINUX 
  27. >: -DNOCOTFMC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 
  28. >: -DCK_AUTHENTICATION -DCK_SSL -DCK_PAM -DZLIB -DCK_CURSES -DCK_POSIX_SIG 
  29. >: -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H -DFNFLOAT -DCK_SHADOW 
  30. >: -I/usr/include/openssl  -DOPENSSL_097 
  31. >: -DKTARGET=\"linux+openssl+zlib+shadow+pam\" -c ckuusx.c
  32. >: ckuusx.c: In function 'ck_termset':
  33. >: ckuusx.c:6181: warning: cast from pointer to integer of different size
  34. >: ckuusx.c:6188: warning: cast from pointer to integer of different size
  35. >: ckuusx.c:6195: warning: cast from pointer to integer of different size
  36. >:
  37. >This is something in the termcap / termlib / ncurses library.  I'd say
  38. >if the file-transfer display still works OK (which is really the only
  39. >things that uses curses, except a few commands like CLEAR SCREEN), then
  40. >it's nothing to worry about.
  41. >
  42. >: ck_ssl.c: In function 'tls_load_certs':
  43. >: ck_ssl.c:1171: warning: cast from pointer to integer of different size
  44. >: ck_ssl.c:1172: warning: cast from pointer to integer of different size
  45. >:
  46. >: This is being compiled on Debian GNU/Linux unstable on a Pentium II machine.
  47. >:
  48. >I'm told that these are nothing to worry about either.  We've always had
  49. >tons of warnings when building with the security libraries and header files,
  50. >yet the features still work OK when used.  Still, it would be nice avoid the
  51. >warnings.
  52.  
  53.  
  54. _ALL_ these statements are invocations of the 'debug()' macro.  'debug()'
  55. expands to a function where the 4th parameter is defined as a CK_OFF_T.
  56.  
  57. The offending invocations all have a 4th parameter that is a "pointer to
  58. something".  Which *VIOLATES* the specification of the dodebug() routine
  59. (in ckuusx.c, line 4849) that the debug() macro expands to.
  60.  
  61. Anyway, the result is a "size mis-match" in these circumstances
  62. between a (void *) and a CK_OFF_T.
  63.  
  64. CK_OFF_T is specced as a type big enough to hold a _file_ offset, and
  65. since it's being compiled with _LARGEFILESOURCE this is a 64-bit qty.
  66. _APPARENTLY_, the compilation options only use a 32-bit _program_ address-
  67. space, thus generating the mis-match.
  68.  
  69. FIX:
  70.  ckuusx.c -- change the last parameter of debug() from "" to 0 on all 3 lines.
  71.  
  72.  ck_ssl.c -- no obvious foolproof fix here.  Explicitly casting the last
  73.        param of the macro to an 32-bit qty -- e.g. "debug(..((int32)ctx))"
  74.        should work, as long as there is a defined 'int32' type.  
  75.        `
  76.        [ I'm assuming that sooner or later somebody _will_ try to compile    ]
  77.        [ C-Kermit on a machine with 32-bit pointers, but only 16-bit ints.   ]
  78.        [ If one decides that it is 'safe' to ignore that case, then a simple ]
  79.        [ ((int)ctx) would work.                                              ]
  80.  
  81.